package cn.yyh.feign.client;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cn.yyh.feign.service.FeignService;

@RestController
public class FeignController {

	@Autowired
	FeignService feignService;
	
	@RequestMapping(value = "/add", method = RequestMethod.GET)
    public Integer add() {
		for (int i = 0; i < 10; i++) {
			System.out.println(feignService.add(10, 20));
		}
        return feignService.add(10, 20);
    }
}
